package com.qf.mvc01.servlet;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/aj")
public class AjaxServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        /*String stuname = req.getParameter("stuname");
        String age = req.getParameter("age");
        System.out.println(stuname+" "+age);
        resp.getWriter().println(stuname+" "+age);*/

        String fname = req.getParameter("fname");
        String lname = req.getParameter("lname");
        System.out.println(fname+" "+lname);

        resp.getWriter().println("hello"+fname+" "+lname);


    }
}
